import type { RouteMeta, RouteRecordRaw } from 'vue-router'

export function buildMeta(data: RouteMeta = {}): RouteMeta {
  return {
    ...data,
    module: 'SYSTEM_DOMAINS',
  }
}
export default {
  path: '/sys',
  meta: buildMeta(),
  component: () => import('@/components/layout/DefaultLayout.vue'),
  children: [
    {
      path: 'system-domains',
      meta: buildMeta({ title: 'DNS' }),
      children: [
        {
          path: 'domain-list',
          name: 'SystemDomainList',
          component: () => import('@/views/system-domains/domain-list'),
          meta: {
            title: '域名管理',
            showPageHeader: true,
            showBack: false,
            currentActiveMenu: 'SystemDomainList',
          },
        },
        {
          path: 'domain-account',
          name: 'SystemDomainAccount',
          component: () => import('@/views/system-domains/domain-account'),
          meta: {
            title: '域名账户',
            showPageHeader: true,
            showBack: false,
            currentActiveMenu: 'SystemDomainAccount',
          },
        },
        // {
        //   path: 'dedicated',
        //   name: 'CouldComputingDedicatedGroup',
        //   component: () => import('@/views/cdn/group/dedicated'),
        //   meta: buildMeta({ title: '节点级联' }),
        // },
      ],
    },
  ],
} satisfies RouteRecordRaw
